<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Student list</title>
</head>
<body>
<form action="/goods/list" method="post">
    <label>Name:</label>
    <input type="text" name="name">
    <label>Price:</label>
    <input type="text" name="price">
    <input type="submit" value="Search">
</form>
<table border="1">
    <tr>
        <td>ID</td>
        <td>Name</td>
        <td>Price</td>
        <td>Action</td>
    </tr>
    <tr th:each="goods:${goodslist}">
        <!--<td th:text="${name}"></td>-->
        <td th:text="${goods.id}"></td>
        <td th:text="${goods.name}"></td>
        <td th:text="${goods.price}"></td>
        <td><a th:href = "@{/goods/delete/{id}(id = ${goods.id})}">Delete</a></td>
        <td><a th:href = "@{/goods/update/{id}(id = ${goods.id})}">Update</a></td>
    </tr>
</table>
<div>
    <a href ="/goods/create">Create</a>
</div>
</body>
</html>